build:
	go build -ldflags "-s -w" -o build/evapi eva.go

build-win:
	CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags "-s -w" -o build/evapi eva.go

build-linux:
	CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-s -w" -o build/evapi eva.go

cp-linux:
	scp build/eva-rpc root@111.111.111.111:/data/eva/api

api:
	cd desc && goctl api go -api eva.api -dir .. && cd -

docs:
	cd desc
	goctl api plugin -plugin goctl-swagger="swagger -filename desc/eva.json -host 47.104.209.27:8080 -basepath /" -api desc/eva.api -dir .
	cd -

docs-run:
	swagger_windows_amd64.exe serve -F=swagger desc/eva.json --port 8081 --host 0.0.0.0 --no-open

run:
	./build/evapi -f etc/eva.yaml

clean:
	rm -rf build

